<template>
	<view>
		<carHeader title="活动详情"></carHeader>
		<div class="zong">
			<div class="header1">
				<div class="header11">
					<span class="son1">标题:</span>
					<div style="display: inline-block;margin-left: 40px;">
						<span class="son2">{{list.title}}</span>
					</div>

				</div>

				<div class="header11">
					<span class="son1">发布人:</span>
					<div style="display: inline-block;margin-left: 24px;">
						<span class="son2">{{list.publisher}}</span>
					</div>
				</div>
				<div class="header11">
					<span class="son1">发布时间:</span>
					<div style="display: inline-block;margin-left: 7px;">
						<span class="son2">{{list.publishTime}}</span>
					</div>
				</div>
				<div class="header11">
					<span class="son1">审核状态:</span>
					<div style="display: inline-block;margin-left: 7px;">
						<span class="son2">{{getStatusText(list.zhuangtai)}}</span>
					</div>
				</div>
				<div class="header11">
					<span class="son1">审核时间:</span>
					<div style="display: inline-block;margin-left: 7px;">
						<span class="son2">{{list.publishTime}}</span>
					</div>
				</div>
				<!-- <div class="header11">
					<span class="son1">审核说明:</span>
					<div style="display: inline-block;margin-left: 7px;">
						<span class="son2">洗车优惠活动开始领取了</span>
					</div>
				</div> -->

			</div>

			<div class="header2">
				<div class="header11" style="display: flex;">
					<div style="width: 200rpx;height: 200rpx;">
					<span class="son1">发布内容:</span>
					</div>
					<div style="width: 450rpx;height: 200rpx;">
						<span class="son22">
							{{list.context}}
						</span>
					</div>
				</div>
				
				<div class="header11" style="margin-top: 30px;">
					<span class="son1" style="position: relative;top: -100px;">图片:</span>
					<div style="display: inline-block;margin-left: 7px;">
						<!-- <span class="son2">洗车优惠活动开始领取了</span> -->
						<image class="i1" :src="list.image"></image>
					</div>
				</div>
				
				
			</div>

		</div>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: {},

			}
		},
		methods: {
			getStatusText(status) {
				switch (status) {
					case 0:
						return '待审核';
					case 1:
						return '审核通过';
					case 2:
						return '审核失败';
					// default:
					// 	return '未知状态';
				}
			},
		},
		onLoad(options) {
			// options 是由 uni-app 框架在页面加载时自动传递的，包含了从上一个页面传递过来的参数 
			console.log(options)
			const obj = JSON.parse(decodeURIComponent(options.data));
			console.log(obj);
			this.list =obj;
			console.log("--------------------");
			console.log(this.list)
			// this.title = obj.title;
			// console.log(this.title)

		}
	}
</script>

<style>
	* {
		margin: 0;
		padding: 0;
	}

	.zong {
		height: 1000rpx;
		width: 100%;
		background-color: #eeeeee;
	}

	.header1 {
		background-color: #ffffff;
		height: 550rpx;
		width: 690rpx;
		margin: 0 auto;
		position: relative;
		top: -120px;
		border-radius: 20px;
	}
	.header2 {
		background-color: #ffffff;
		height: 500rpx;
		width: 690rpx;
		margin: 0 auto;
		margin-top: 10px;
		position: relative;
		top: -120px;
		border-radius: 20px;
	}

	.header11 {
		width: 690rpx;
		height: 100rpx;
		/* 	background-color: antiquewhite; */
		border-radius: 20px;

	}

	.son1 {
		margin-left: 14px;
		font-weight: 600;
		font-size: 17px;
		position: relative;
		top: 12px;
	}

	.son2 {
		font-size: 16px;
		position: relative;
		top: 12px;
		margin-left: 10px;

	}
	.son22 {
		font-size: 16px;
		position: relative;
		top: 12px;
	
	
	}
	.i1{
		width: 130px;
		height: 130px;
		margin-left: 40px;
		position: relative;
		margin-top: 20px;
		
	}

</style>